package lab02.test15;

/**
 * Created by admin on 2017/10/20.
 */
public class Graduate implements StudentInterface,TeacherInterface {
    //属性：name（姓名），sex（性别），age（年龄），fee（每学期学费） pay（月工资）。
    String name;
    String sex;
    int age;
    double fee;
    double pay;

    public Graduate(String name, double fee, double pay) {
        super();
        this.name = name;
        this.fee = fee;
        this.pay = pay;
        if (this.pay - this.fee < 2000)
            System.out.println("You  need a loan!");
        else
            System.out.println("You income is enough！");
    }

    @Override
    public void setPay() {
        this.pay = pay;
    }

    @Override
    public double getPay() {
        return this.pay;
    }

    @Override
    public void setFee() {
        this.fee = fee;
    }

    @Override
    public double getFee() {
        return this.fee = fee;

    }


    public static void main(String[] args) {
        new Graduate("zhangsan", 3000, 2000);
    }
}
